<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="echarts.min.js"></script>
</head>
<body>
<div id="box" style="width: 400px;height: 500px;"></div>
<script>
    //1.指定图形配置参数
    var option={
        title:{text:"销售统计数据"},
        tooltip:{},
        legend:{data:["数据源来自网络"]},
        xAxis:{data:["Android","IOS","华为","其它"]},
        yAxis:{},
        series:[
            {name:"销售量",type:"bar",data:[500,200,360,100]}
        ]
        /*series:[
            {name:"销售量",type:"line",data:[500,200,360,100]}
        ]*/
    };
    //2.初始化实例
    var myChart=echarts.init(box);
    //3.使用配置参数显示图标
    myChart.setOption(option);
</script>
</body>
</html>